package cn.junit;


import org.junit.Test;

import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zgn
 * @Description: simJunit
 * @date 2022/1/13 0013
 */
public class simJunit {
    @Test
    public void egMin() {//e.g.
        System.out.println();
    }
    /*templates.add("Controller.java.vm");
        templates.add("Service.java.vm");
        templates.add("Model.java.vm");
        templates.add("Mapper.java.vm");
        templates.add("Mapper.xml.vm");*/
    enum TempFileEnum {
        Controller("Controller.java.vm"),
        Service("Service.java.vm");

        String enumField;

        TempFileEnum(String value) {
            this.enumField = value;
        }
    }
    @Test
    public void switch_listegMin() {//e.g.
        List<String> stringList=new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            stringList.add("String"+i);
        }

        String test="String1";
        for (TempFileEnum obj : TempFileEnum.values()) {
            System.out.println(obj);
            System.out.println(obj.enumField);
        }


        System.out.println();
    }

    @Test
    public void 相对路径_egMin() {//e.g.
        String propPath="/src/main/resources/template/gx/generator.properties";
        String relativelyPath = System.getProperty("user.dir");//获取当前项目的根目录|D:/IDEAWork/play/private/code-gen
        System.out.println(relativelyPath+propPath);
        System.out.println();
    }

    @Test
    public void 字串替换_egMin() {//e.g.

        System.out.println("main.java/com.zfast/yugioh/model/CardMagic.java".replace(".", File.separator));
    }

    @Test
    public void egMax() {//e.g.
        //region 模拟数据
        System.out.println("--------------------Start--------------------");
        //endregion

        //region 数据处理
        System.out.println("--------------------Deal--------------------");
        //endregion

        //region 数据展示
        System.out.println("--------------------Done--------------------");
        //endregion
    }
}
